package com.neusoft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.po.OrderItemRel;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderItemRelMapper extends BaseMapper<OrderItemRel> {


    @Select("select item_id from (select count(0) cou, item_id from order_item_rel group by item_id order by cou desc limit 5) a")
    List<Integer> mostSold();
}
